Skip to content

Move per-function debuginfo methods from codegen to builder methods#158560

Merged
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
bjorn3:ssa_refactor_debuginfo
Jun 30, 2026
Merged

Move per-function debuginfo methods from codegen to builder methods#158560
rust-bors[bot] merged 5 commits into
rust-lang:mainfrom
bjorn3:ssa_refactor_debuginfo

Conversation

@bjorn3

@bjorn3 bjorn3 commented Jun 29, 2026

Copy link
Copy Markdown
Member

In cg_clif the debuginfo for the function we are currently codegening is stored in FunctionDebugContext, which is stored in the FunctionCx, not in the per-cgu DebugContext.

@rustbot

rustbot commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

rustc_codegen_gcc is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_gcc instead.

cc @antoyo, @GuillaumeGomez

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jun 29, 2026
@rustbot

rustbot commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

r? @Kivooeo

rustbot has assigned @Kivooeo.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler, debuginfo
  • compiler, debuginfo expanded to 73 candidates
  • Random selection from 17 candidates

@Kivooeo Kivooeo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, only thing I want to check: in last commit you changed a new and finalize methods, before new method was a constructor, now it adds some flags that before was added by finalize method

View changes since this review

@bjorn3

bjorn3 commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

in last commit you changed a new and finalize methods, before new method was a constructor, now it adds some flags that before was added by finalize method

Indeed. I don't think the order matters.

@Kivooeo

Kivooeo commented Jun 30, 2026

Copy link
Copy Markdown
Member

@bors r+ rollup

@rust-bors

rust-bors Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 7d346e2 has been approved by Kivooeo

It is now in the queue for this repository.

🌲 The tree is currently closed for pull requests below priority 1. This pull request will be tested once the tree is reopened.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 30, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 30, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #158600 (Fix `rustc --unpretty=expanded` emit of `[const] [unsafe] impl Trait for`)
 - #158560 (Move per-function debuginfo methods from codegen to builder methods)
 - #158563 (Test(lib/net): Fix `hostname_smoketest` for Win7)
 - #158571 (Update books)
 - #158592 (tests: only run `lexical-scope-in-match.rs` for LLDB >= 21)
rust-bors Bot pushed a commit that referenced this pull request Jun 30, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #158600 (Fix `rustc --unpretty=expanded` emit of `[const] [unsafe] impl Trait for`)
 - #158560 (Move per-function debuginfo methods from codegen to builder methods)
 - #158563 (Test(lib/net): Fix `hostname_smoketest` for Win7)
 - #158571 (Update books)
 - #158592 (tests: only run `lexical-scope-in-match.rs` for LLDB >= 21)
@rust-bors rust-bors Bot merged commit d1462c2 into rust-lang:main Jun 30, 2026
13 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 30, 2026
rust-timer added a commit that referenced this pull request Jun 30, 2026
Rollup merge of #158560 - bjorn3:ssa_refactor_debuginfo, r=Kivooeo

Move per-function debuginfo methods from codegen to builder methods

In cg_clif the debuginfo for the function we are currently codegening is stored in `FunctionDebugContext`, which is stored in the `FunctionCx`, not in the per-cgu `DebugContext`.
@bjorn3 bjorn3 deleted the ssa_refactor_debuginfo branch July 1, 2026 08:50
bjorn3 pushed a commit to bjorn3/miri that referenced this pull request Jul 1, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#158600 (Fix `rustc --unpretty=expanded` emit of `[const] [unsafe] impl Trait for`)
 - rust-lang/rust#158560 (Move per-function debuginfo methods from codegen to builder methods)
 - rust-lang/rust#158563 (Test(lib/net): Fix `hostname_smoketest` for Win7)
 - rust-lang/rust#158571 (Update books)
 - rust-lang/rust#158592 (tests: only run `lexical-scope-in-match.rs` for LLDB >= 21)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants